<% include header %>
<div class="container" style="margin: 20px 50px;">
    <h3 id="title">上传头像</h3>
    <hr style="width: 90%;"/>
    <div style="margin: 50px auto;width: 300px;">
        <div style="width: 200px;height: 200px;margin-bottom: 50px;">
            <%if(user.txname){%>
            <img id="bgimg" style="width: 100%;height: 100%;" src="images/<%= user.txname%>" alt="<%= user.name%>">
            <%}else{%>
            <img id="bgimg" style="width: 100%;height: 100%;" src="images/timg.jpg">
            <%}%>
        </div>
        <form style="margin: 10px 0;" method="post" enctype="multipart/form-data">
            <input type="button" value="选择图片" id="chooseImg" class="btn btn-success"/>
            <input id="file" type="file" name="photo" style="display: none">
            <input type="submit" class="btn btn-primary" value="上传头像" style="margin-left: 32px;">
        </form>
    </div>
</div>
<% include footer %>